cc.Class({
    extends: cc.Component,

    properties: {
    },
    // LIFE-CYCLE CALLBACKS:
    // 三个碰撞函数
    onCollisionEnter: function (other, self) {
        console.log('enter')
    },
    onCollisionStay: function (other, self) {
        cc.director.loadScene('OverScene')
    },
    onCollisionExit: function (other, self) {
        console.log('exit')
    },
    onLoad: function() {
        // 获取碰撞管理器
        var manager = cc.director.getCollisionManager()
        // 注册回调, 如果有碰撞则回调
        manager.enabled = true
        // debug
        // manager.enabledDebugDraw = true
    }

    // update (dt) {},
});
